home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 415_02 / rtti / include / trace.h < prev   
Encoding:
C/C++ Source or Header  |  1993-11-04  |  1.3 KB  |  59 lines

  1. #ifndef    _H_TRACE
  2. #define    _H_TRACE
  3.  
  4. /* %Z%%I%       %G% %U% %W% */
  5. /*
  6.  * COMPONENT_NAME: (COMINC) Common Header File for RTTI
  7.  *
  8.  * ORIGINS: 27
  9.  *
  10.  * (C) COPYRIGHT International Business Machines Corp. 1992
  11.  * This work was supported by a grant from International Business
  12.  * Machines, Inc. These procedures are contributed to the public domain
  13.  * by International Business Machines Inc. "AS IS" without any warranty
  14.  * of any kind including the warranty of merchantability or fitness
  15.  * for a particular purpose.
  16.  *
  17.  *
  18.  * This is free software. Feel free to redistribute and/or modify it.
  19.  * Please send us e-mail and let us know if you have any problems
  20.  * or suggestions.
  21.  *
  22.  * Arindam Banerji
  23.  * axb@cse.nd.edu
  24.  *
  25.  */
  26.  
  27.  
  28. #include   <iostream.h>
  29. #include   "String.h"
  30.  
  31.  
  32. // trace.hh
  33. // This defines a simplistic trace utility.
  34.  
  35.  
  36. const int  CLASSTYPE = 10 ;
  37. const int  FUNCTIONTYPE = 11  ;
  38.  
  39.  
  40. // This is the base class of the trace utility and it recognises
  41. // only the category of the trace ie : a function trace or a
  42. // class based trace. In addition, the scope name if relevant,
  43. // is also stored in the common base class.
  44. class     Trace  {
  45.  public:
  46.    Trace () { } ;
  47.    Trace(string ) ;
  48.    Trace(string ,string ) ;
  49.    ~Trace () ;
  50.  
  51.     private:
  52.      string     classname ;
  53.      string     funcname ;
  54.      int        type ;
  55.    } ;
  56.  
  57. #endif     // _H_TRACE
  58.  
  59.